<template>
  <div>
    <el-input
      v-model="valueTitle"
      placeholder="用于展示关联表单的属性，且数据不会保存"
      readonly
    ></el-input>
  </div>
</template>
<script>
import { getUserInfoList } from "@/api/permission/userXy";

export default {
  name: "",
  props: {
    value: {
      default: "",
    },
    showTxt: {
      default: "",
    },
  },
  data() {
    return {
      valueTitle: "",
    };
  },
  created() {},
  watch: {
    value(val) {
      this.valueTitle = "";
      if (val && this.showTxt)
        getUserInfoList(val.split(",")).then((res) => {
          let txt = res.data.list[0];
          this.valueTitle = txt[this.showTxt];
        });
    },
  },
  methods: {},
};
</script>
<style scoped lang='less'>
</style>